package com.mjx.algorithm.oj;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * Dinner(水)
 * Created by 梅京翔 on 2017 02 11下午 4:35.
 */
public class problem1223 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<String,String>();
        map.put("bowl","bowl");
        map.put("knife","knife");
        map.put("fork","fork");
        map.put("chopsticks","chopsticks");
        Scanner scanner = new Scanner(System.in);
        while (true){
            String s = scanner.nextLine();
            String[] str = s.split(" ");
            boolean isFirst = true;
            for (int i = 0; i < str.length; i++) {
                if (map.containsKey(str[i])){
                    if (isFirst) {
                        System.out.print(str[i]);
                        isFirst = false;
                    }
                    else
                        System.out.print(" " + str[i]);
                }
            }
            System.out.println();
        }
    }
}
